<template>
	<view class="container">
		<view class="main">
			<view class="list" @click="navTo(item.id)" v-for="(item,index) in list" :key="index" :style="{borderBottom:index!=list.length-1?'1px solid #E5E5E5':''}"><text class="flex1">{{item.title}}</text><text class="cell-icon yticon icon-you" ></text></view>
		</view>
	</view>
</template>

<script>
	import {mapMutations} from 'vuex';
	import Api from '@/common/api';
	export default{
		
		data(){
			return {
				list:[]
			}
		},
		onLoad(){
			
		},
		onShow(){
			this.loadList()
		},
		methods: {
			...mapMutations(['login']),
			
			async loadList(){
				
				let data = await Api.apiCall('get',Api.apiName.help_list,{},true);
				if(!data){
					return;
				}
				this.list =data.data;
			},
			navTo(id){
				uni.navigateTo({
					url:'/pages/public/helpDetail?id='+id
				})
			}
		},

	}
</script>

<style lang='scss'>
	page{
		background: #F5F5F5;
	}
	.main{
		margin: 30upx;
		background: #FFFFFF;
		border-radius: 16upx;
	}
	.list{
		padding: 30upx 0upx;
		margin:0upx 44upx;
		display: flex;
		font-size: 32upx;
	}
	.flex1{
		flex: 1;
	}
</style>
